#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main()
{
	int x,y;
	int i,j,q;
	q=0;
	x=20;
	y=10;
	int fashe=0;
	char input;
	while(1)
	{  system("cls");

		if(input==' ')
	{
		fashe=1;
	}
	    	q++;
	printf("%d",q);	 
	for(i=1;i<=x;i++)
	{   
	  	printf("\n");
	  	for(j=1;j<=y;j++)
	{
		printf(" ");
	}   
	    if(fashe==1)
	    {
	      printf("  |");
		}
	    
    }
    printf("\n");
		for(j=1;j<=y;j++)
	{
		printf(" ");
	}
	printf("  *\n");
	    for(j=1;j<=y;j++)
	{
		printf(" ");
	}
	printf("*****\n");
	    for(j=1;j<=y;j++)
	{
		printf(" ");
	}
	printf(" * *");
	//scanf("%c",&input);
		input = getch();
	if(input=='w')
	{
		x--;
	}
	if(input=='s')
	{
		x++;
	}
	if(input=='a')
	{
		y--;
	}
	if(input=='d')
	{
		y++;
	}
	fashe=0; 

	}
	
} 
